package Message.Public
{
    import Framework.MQ.*;
    import Framework.Serialize.*;

    public class SPublicMiniPlayer extends Object implements IMessageBase
    {
        public var entityId:SEntityId;
        public var name:String;
        public var sex:int;
        public var camp:int;
        public var career:int;
        public var level:int;
        public var VIP:int;
        public var copyId:int;
        public var captain:int;
        public var online:int;
        public var reserveByte2:int;
        public var num:int;
        public var gateChannelId:int;
        public var warfare:int;
        public var copyCode:int;
        public var mapId:int;
        public const _type:int = 8;
        public static var _regist:SPublicMiniPlayer = new SPublicMiniPlayer(true);

        public function SPublicMiniPlayer(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            
        }

        public function getType() : int
        {
            return this._type;
        }

        public function clone() : IMessageBase
        {
            return new SPublicMiniPlayer();
        }

        public function __write(param1:SerializeStream) : void
        {
            this.entityId.__write(param1);
            param1.writeString(this.name);
            param1.writeByte(this.sex);
            param1.writeByte(this.camp);
            param1.writeShort(this.career);
            param1.writeByte(this.level);
            param1.writeByte(this.VIP);
            param1.writeInt(this.copyId);
            param1.writeByte(this.captain);
            param1.writeByte(this.online);
            param1.writeByte(this.reserveByte2);
            param1.writeInt(this.num);
            param1.writeInt(this.gateChannelId);
            param1.writeInt(this.warfare);
            param1.writeInt(this.copyCode);
            param1.writeInt(this.mapId);
            
        }

        public function __read(param1:SerializeStream) : void
        {
            this.entityId = new SEntityId();
            this.entityId.__read(param1);
            this.name = param1.readString();
            this.sex = param1.readByte();
            this.camp = param1.readByte();
            this.career = param1.readShort();
            this.level = param1.readByte();
            this.VIP = param1.readByte();
            this.copyId = param1.readInt();
            this.captain = param1.readByte();
            this.online = param1.readByte();
            this.reserveByte2 = param1.readByte();
            this.num = param1.readInt();
            this.gateChannelId = param1.readInt();
            this.warfare = param1.readInt();
            this.copyCode = param1.readInt();
            this.mapId = param1.readInt();
            
        }

    }
}
